/* 基础变量定义 */
$primary-color: #1677ff; // 主色调（蓝色）
$success-color: #52c41a; // 成功色（绿色）
$warning-color: #faad14; // 警告色（黄色）
$error-color: #ff4d4f;  // 错误色（红色）
$text-color: #333;       // 主要文本颜色
$text-secondary-color: #666; // 次要文本颜色
$text-light-color: #999;     // 浅色文本
$border-color: #e5e5e5;      // 边框颜色
$background-color: #f5f7fa;  // 背景色
$card-bg: #fff;              // 卡片背景
$radius: 8px;                // 圆角半径
$shadow: 0 2px 8px rgba(0, 0, 0, 0.09); // 阴影效果

/* 页面容器样式 */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: $background-color;
  padding: 20px;

  .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  /* 图片容器样式 */
  .image-container {
    background-color: $card-bg;
    border-radius: $radius;
    padding: 15px;
    box-shadow: $shadow;

    .image-wrapper {
      position: relative;
      width: 100%;
      height: 0;
      padding-bottom: 62.5%; /* 保持5:3宽高比 */
      overflow: hidden;
      border-radius: $radius;

      .original-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.3s ease; /* 添加过渡效果 */
      }
    }

    .image-caption {
      margin-top: 10px;
      color: $text-secondary-color;
      font-size: 14px;
    }
  }

  /* 控制面板样式 */
  .control-panel {
    background-color: $card-bg;
    border-radius: $radius;
    padding: 15px;
    box-shadow: $shadow;

    .button-group {
      display: flex;
      gap: 15px;
      margin-bottom: 20px;

      /* 按钮基础样式 */
      .btn {
        flex: 1;
        padding: 12px 0;
        border-radius: $radius;
        font-size: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;

        text {
          line-height: 1;
        }
      }

      /* 重拍按钮样式 */
      .rephoto-btn {
        background-color: #fff;
        border: 1px solid $primary-color;
        color: $primary-color;

        &:active {
          background-color: rgba(22, 119, 255, 0.05);
        }
      }

      /* 检测按钮样式 */
      .detect-btn {
        background-color: $primary-color;
        color: white;
        border: none;

        &:active {
          background-color: rgba(22, 119, 255, 0.9);
        }
      }
    }
	/*xy切块*/
	.cut-block-container {
	  display: flex;
	  padding: 15px;
	  flex-direction: column; // 修改为垂直排列
	  background-color: #fff;
	  border-radius: 8px;
	  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	
	  .cut-item {
	    display: flex;
	    align-items: center;
	    margin-bottom: 10px; // 垂直间距
		margin-right: 0;
	
	    &:last-child {
	      margin-bottom: 0;
	    }
	
	    .label {
	      font-size: 14px;
	      color: #666;
	      margin-right: 8px;
		   width: 80px; 
	    }
	
	    .input-box {
		  flex: 1;
	      width: 80px;
	      height: 30px;
	      border: 1px solid #e5e5e5;
	      border-radius: 4px;
	      padding: 0 8px;
	      font-size: 14px;
	      color: #333;
	      background-color: #f8f8f8;
	
	      &:focus {
	        border-color: #409eff;
	        outline: none;
	      }
	    }
	  }
	}
    /* 设置项样式 */
    .settings-group {
      display: flex;
      flex-direction: column;
      gap: 15px;

      .setting-item {
        .label {
          display: block;
          margin-bottom: 8px;
          font-weight: 500;
          color: $text-color;
        }

        /* 滑块容器样式 */
        .slider-container {
          display: flex;
          align-items: center;

          .custom-slider {
            flex: 1;
            margin-right: 15px;
          }
        }
		

        /* 下拉选择器样式 */
        .custom-select {
          position: relative;
          border: 1px solid $border-color;
          border-radius: $radius;
          padding: 10px 15px;
          background-color: white;
          display: flex;
          align-items: center;
          justify-content: space-between;
        }
      }
      
      /* 切块参数特定样式 */
      .block-settings {
        .block-inputs {
          display: flex;
          gap: 15px;      
        }
      }
    }
  }

  /* 结果面板样式 */
  .result-panel {
    background-color: $card-bg;
    border-radius: $radius;
    padding: 15px;
    box-shadow: $shadow;
    animation: fadeIn 0.5s ease; /* 淡入动画 */
    

    .result-content {
      display: flex;
      flex-direction: column;
      gap: 20px;

      .result-details {
        display: flex;
        flex-direction: column;
        gap: 20px;

        .detail-section {
          .section-title {
            font-size: 16px;
            font-weight: 500;
            color: $text-color;
            margin-bottom: 10px;
            padding-bottom: 5px;
            border-bottom: 1px solid $border-color;
          }

          /* 结果列表容器（带滚动条） */
          .result-list-container {
            height: 300px; /* 固定高度 */
            overflow-y: auto;
            border: 1px solid $border-color;
            border-radius: $radius;
            padding: 10px;
            margin-top: 15px;

            /* 滚动条样式 */
            &::-webkit-scrollbar {
              width: 6px;
            }

            &::-webkit-scrollbar-track {
              background-color: #f5f7fa;
              border-radius: $radius;
            }

            &::-webkit-scrollbar-thumb {
              background-color: $primary-color;
              border-radius: $radius;
            }

            .result-list {
              display: block;
              gap: 10px;
              padding: 0;

              /* 单个结果项样式 */
              .result-item {
                padding: 12px 15px;
                background-color: #f9f9f9;
                border-radius: $radius;
                box-shadow: 0 1px 2px rgba(0,0,0,0.05);
                transition: all 0.3s ease; /* 悬停动画 */

                &:hover {
                  transform: translateX(5px);
                  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
                }
              }
            }
          }

          /* 摘要统计样式 */
          .summary-stats {
            grid-template-columns: 1fr;
            gap: 12px;

           
          }
        }
      }
    }

    /* 结果操作按钮样式 */
    .result-actions {
      display: flex;
      gap: 15px;
      margin-top: 20px;

      .btn {
        flex: 1;
        padding: 12px 0;
        border-radius: $radius;
        font-size: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;

        text {
          line-height: 1;
        }
      }

      /* 保存按钮样式 */
      .save-btn {
        background-color: $primary-color;
        color: white;
        border: none;

        &:active {
          background-color: rgba(22, 119, 255, 0.9);
        }
      }
    }
  }

  /* 淡入动画定义 */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}